package org.cs.publics.model;
// Generated 2018-12-28 17:39:08 by Hibernate Tools 5.2.3.Final

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * GoodsExplain generated by hbm2java
 */
@Entity
@Table(name = "goods_explain", catalog = "good_fresh")
public class GoodsExplain implements java.io.Serializable {

	private Integer goodsExplainId;
	private Admin admin;
	private GoodsInfo goodsInfo;
	private Long goodsExplainPrice;
	private Long goodsExplainVipPrice;
	private String goodsExplainName;
	private Date goodsExplainCreateTime;
	private Integer goodsExplainNumber;
	private Date goodsExplainUpdateTime;
	private Integer goodsExplainState;
	private String goodsHoldOne;
	private String goodsHoldTwo;
	private Set<ShopCart> shopCarts = new HashSet<ShopCart>(0);

	public GoodsExplain() {
	}

	public GoodsExplain(Admin admin, GoodsInfo goodsInfo, Long goodsExplainPrice, Long goodsExplainVipPrice,
			String goodsExplainName, Date goodsExplainCreateTime, Integer goodsExplainNumber,
			Date goodsExplainUpdateTime, Integer goodsExplainState, String goodsHoldOne, String goodsHoldTwo,
			Set<ShopCart> shopCarts) {
		this.admin = admin;
		this.goodsInfo = goodsInfo;
		this.goodsExplainPrice = goodsExplainPrice;
		this.goodsExplainVipPrice = goodsExplainVipPrice;
		this.goodsExplainName = goodsExplainName;
		this.goodsExplainCreateTime = goodsExplainCreateTime;
		this.goodsExplainNumber = goodsExplainNumber;
		this.goodsExplainUpdateTime = goodsExplainUpdateTime;
		this.goodsExplainState = goodsExplainState;
		this.goodsHoldOne = goodsHoldOne;
		this.goodsHoldTwo = goodsHoldTwo;
		this.shopCarts = shopCarts;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)

	@Column(name = "GOODS_EXPLAIN_ID", unique = true, nullable = false)
	public Integer getGoodsExplainId() {
		return this.goodsExplainId;
	}

	public void setGoodsExplainId(Integer goodsExplainId) {
		this.goodsExplainId = goodsExplainId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ADMIN_ID")
	public Admin getAdmin() {
		return this.admin;
	}

	public void setAdmin(Admin admin) {
		this.admin = admin;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "GOODS_INFO_ID")
	public GoodsInfo getGoodsInfo() {
		return this.goodsInfo;
	}

	public void setGoodsInfo(GoodsInfo goodsInfo) {
		this.goodsInfo = goodsInfo;
	}

	@Column(name = "GOODS_EXPLAIN_PRICE", precision = 10, scale = 0)
	public Long getGoodsExplainPrice() {
		return this.goodsExplainPrice;
	}

	public void setGoodsExplainPrice(Long goodsExplainPrice) {
		this.goodsExplainPrice = goodsExplainPrice;
	}

	@Column(name = "GOODS_EXPLAIN_VIP_PRICE", precision = 10, scale = 0)
	public Long getGoodsExplainVipPrice() {
		return this.goodsExplainVipPrice;
	}

	public void setGoodsExplainVipPrice(Long goodsExplainVipPrice) {
		this.goodsExplainVipPrice = goodsExplainVipPrice;
	}

	@Column(name = "GOODS_EXPLAIN_NAME", length = 100)
	public String getGoodsExplainName() {
		return this.goodsExplainName;
	}

	public void setGoodsExplainName(String goodsExplainName) {
		this.goodsExplainName = goodsExplainName;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "GOODS_EXPLAIN_CREATE_TIME", length = 19)
	public Date getGoodsExplainCreateTime() {
		return this.goodsExplainCreateTime;
	}

	public void setGoodsExplainCreateTime(Date goodsExplainCreateTime) {
		this.goodsExplainCreateTime = goodsExplainCreateTime;
	}

	@Column(name = "GOODS_EXPLAIN_NUMBER")
	public Integer getGoodsExplainNumber() {
		return this.goodsExplainNumber;
	}

	public void setGoodsExplainNumber(Integer goodsExplainNumber) {
		this.goodsExplainNumber = goodsExplainNumber;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "GOODS_EXPLAIN_UPDATE_TIME", length = 19)
	public Date getGoodsExplainUpdateTime() {
		return this.goodsExplainUpdateTime;
	}

	public void setGoodsExplainUpdateTime(Date goodsExplainUpdateTime) {
		this.goodsExplainUpdateTime = goodsExplainUpdateTime;
	}

	@Column(name = "GOODS_EXPLAIN_STATE")
	public Integer getGoodsExplainState() {
		return this.goodsExplainState;
	}

	public void setGoodsExplainState(Integer goodsExplainState) {
		this.goodsExplainState = goodsExplainState;
	}

	@Column(name = "GOODS_HOLD_ONE", length = 25)
	public String getGoodsHoldOne() {
		return this.goodsHoldOne;
	}

	public void setGoodsHoldOne(String goodsHoldOne) {
		this.goodsHoldOne = goodsHoldOne;
	}

	@Column(name = "GOODS_HOLD_TWO", length = 25)
	public String getGoodsHoldTwo() {
		return this.goodsHoldTwo;
	}

	public void setGoodsHoldTwo(String goodsHoldTwo) {
		this.goodsHoldTwo = goodsHoldTwo;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "goodsExplain")
	public Set<ShopCart> getShopCarts() {
		return this.shopCarts;
	}

	public void setShopCarts(Set<ShopCart> shopCarts) {
		this.shopCarts = shopCarts;
	}

}
